/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package otcapp.controlador.modeloTablas;

import otcapp.dto.InternoDTO;

/**
 *
 * @author diego
 */
public class ModeloTablaInternos extends ModeloTabla {

    public ModeloTablaInternos() {
        super("Apellido", "Nombre", "DNI");
    }

    @Override
    public Object getValueAt(int rowIndex, int columnIndex) {
        if (getListaElementos() == null) {
            return null;
        }
        InternoDTO interno = (InternoDTO) getListaElementos().get(rowIndex);
        switch (columnIndex) {
            case 0:
                return interno.getApellido();
            case 1:
                return interno.getNombre();
            case 2:
                return interno.getDni();
            default:
                return "";

        }
    }
}
